# coding=utf-8
import sys
# 计算n条直线(无三点共线)可能形成的不同交点数
 
def create2dArray(m, n):
    return [[0 for _ in range(n)] for _ in range(m)]
 
# 定义最大处理的直线数
max_lines = 20  # 增加到100以处理更大的输入
max_intersections = max_lines * (max_lines - 1) // 2  # n条直线最多交点数
 
dp = create2dArray(max_lines + 1, max_intersections + 1)
 
# 初始化：任意数量的直线都可以形成0个交点(所有直线平行)
for i in range(max_lines + 1):
    dp[i][0] = 1
 
# 动态规划填充dp数组
def fill_dp():
    for i in range(max_lines + 1):  # 现有i条直线
        for j in range(max_intersections + 1):  # 现有j个交点
            if dp[i][j] == 1:  # 如果i条直线可以形成j个交点
                # 添加k条平行线新直线，k从1到max_lines-i
                for k in range(1, max_lines - i + 1):
                    # 新增的交点数 = 新直线与原直线的交点数(i*k) + j
                    dp[i + k][j + i * k] = 1
 
# 预先填充dp数组
fill_dp()
 
def main():
    for line in sys.stdin.readlines():
        n = int(line.strip())
    
        max_possible = n * (n - 1) // 2  # n条直线最多能形成的交点数
        
        # 输出所有可能的交点数
        results = []
        for j in range(0, max_possible + 1):
            if dp[n][j] == 1:
                results.append(str(j))
        
        print(' '.join(results))
 
if __name__ == "__main__":
    main()